import service from '../utils/request.js'; // 引入二次封装的 axios

// 养老服务管理
export const addElderlyService = (elderlyService) => {
    return service.post('/api/admin/elderlyService/add', elderlyService);
};

export const deleteElderlyServiceById = (id) => {
    return service.post(`/api/admin/elderlyService/delete/${id}`);
};

export const getElderlyServiceById = (id) => {
    return service.get(`/api/admin/elderlyService/detail/${id}`);
};

export const listElderlyServices = (params) => {
    return service.post('/api/admin/elderlyService/list', params);
};

export const updateElderlyService = (elderlyService) => {
    return service.post('/api/admin/elderlyService/update', elderlyService);
};

// 客户端接口
export const queryElderlyServiceList = (params) => {
    return service.post('/api/client/elderlyService/getElderlyService',params);
};

export const serviceReservationApi = (elderlyService) => {
    return service.post('/api/client/elderlyService/addElderlyService',elderlyService);
};